fix(react-spa): translate remaining hardcoded Spanish UI strings - #243
Open
jwatson2029 wants to merge 1 commit into
Open
fix(react-spa): translate remaining hardcoded Spanish UI strings#243jwatson2029 wants to merge 1 commit into
jwatson2029 wants to merge 1 commit into
Conversation
Several user-facing strings bypassed the product i18n layer and rendered in Spanish regardless of the resolved locale, because they were hardcoded literals rather than catalog lookups: - rules manager filter tabs (Todos/Permitidas/Bloqueadas/Inhabilitadas) - hierarchical rules table headers (Estado/Acciones) - dashboard sort options (Nombre (A-Z)/Recientes) - users CSV export headers (Nombre/Estado/Roles_codigo/Estado_codigo) Test expectations asserting the previous Spanish labels are updated to match. The es catalog in product-i18n is untouched. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A few user-facing strings in the SPA are hardcoded Spanish literals rather than
product-i18ncatalog lookups, so they render in Spanish regardless of thelocale resolved by
resolveProductLocale— including forenbrowsers.This translates the ones that are not routed through
t():Todos/Permitidas/Bloqueadas/Inhabilitadas(
useRulesManagerViewModel.ts)Estado/Acciones(
HierarchicalRulesTable.tsx, alongside existingt()calls in the same<tr>)Nombre (A-Z)/Recientes(
useDashboardViewModel.ts, whererulesalready usest('dashboard.sort.mostRules'))Nombre/Estado/Roles_codigo/Estado_codigo(
exportUsers.ts)The
escatalog inproduct-i18n.tsxis deliberately untouched; this onlyaffects literals that bypassed the i18n layer entirely.
Test expectations that asserted the previous Spanish labels are updated to match.
Happy to instead route these through new catalog keys (
en+es) if you'dprefer that over plain English literals — that felt like the larger call to make,
so I kept this change minimal and consistent with the surrounding code.
Test plan
npm run test:react-spanpm run verify:quickMade with Cursor